{include file='common/header' /}
    <script>
        var M = {};
        $(function() {
            M.runtime = function runtime(p){
                EBCMS.CORE.submit({
                    url:'{:url('runtime')}',
                    queryParams:p,
                    success:function(res){
                       EBCMS.MSG.notice(res.msg);
                    }
                });
            };
            setTimeout(function() {
                art.dialog.notice({
                    title: '欢迎！',
                    width: 220,
                    content: '欢迎使用易贝云系统！如有好的创意或点子，欢迎反馈给我们。谢谢！',
                    icon: 'face-smile',
                    time: 5
                });
            }, 500);
            M.tools = function(opt){
                switch (opt.tool) {
                    case 'jisuanqi':
                        art.dialog({
                            id:'jisuanqi',
                            title:'计算器',
                            time:0,
                            lock: false,
                            fixed: false,
                            drag: true,
                            content: '<iframe src="__ROOT__/tools/jisuanqi/base.html" width="390" height="266" frameborder="0"></iframe>',
                            padding:'0px',
                            button: [{
                                name: '普通计算器',
                                callback: function () {
                                    this.content('<iframe src="__ROOT__/tools/jisuanqi/base.html" width="390" height="266" frameborder="0"></iframe>');
                                    return false;
                                }
                            },{
                                name: '科学计算器',
                                callback: function () {
                                    this.content('<iframe src="__ROOT__/tools/jisuanqi/ext.html" width="700" height="360" frameborder="0"></iframe>');
                                    return false;
                                }
                            }],
                        });
                        break;
                    case 'email':
                        $('#main').attr('src', '{:url('email')}');
                        break;
                    default:
                        /*statements_def*/
                        break;
                }
            };
        });
    </script>
    <div class="header" style="height:50px;padding:0px;z-index:1001;">
        <nav class="navbar navbar-static-top navbar-default navbar-inverse" style="margin-bottom:0;" role="navigation">
            <div class="container-fluid">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#top-nav" aria-expanded="false">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="http://www.ebcms.com" target="_blank">
                        <h3 style="margin:0;"><b>易贝云</b> <span style="font-size: .5em;">网站管理系统</span></h3>
                    </a>
                </div>
                <div class="collapse navbar-collapse" id="top-nav">
                    <ul class="nav navbar-nav">
                        {php}
                            $menu = my_menu();
                            $menu = \ebcms\Tree::tree($menu);
                        {/php}
                        {foreach name='menu' item='vo'}
                            {notempty name='vo.rows'}
                                <li class="dropdown">
                                    <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><b>{$vo.title}</b> <span class="caret"></span></a>
                                    <ul class="dropdown-menu">
                                        {foreach name='vo.rows' item='v'}
                                        {if condition="$v['title'] == '__DIVIDER__'"}
                                            <li role="separator" class="divider"></li>
                                        {else/}
                                            {php}
                                                $target = strpos($v['url'],'javascript:') === 0 ? '' : 'main';
                                            {/php}
                                            <li><a href="{$v.url}" target="{$target}">{$v.title}</a></li>
                                        {/if}
                                        {/foreach}
                                    </ul>
                                </li>
                            {else/}
                                <li><a href="{$vo.url}" target="main">{$vo.title}</a></li>
                            {/notempty}
                        {/foreach}
                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        <li><a href="{:get_root(true)}" target="_blank">前台</a></li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><b>{:session('manager_nickname')}</b> <span class="caret"></span></a>
                            <ul class="dropdown-menu">
                                <li><a href="{:url('password')}" target="main">修改密码</a></li>
                                <li role="separator" class="divider"></li>
                                <li><a href="{:url('ebcms/auth/logout')}">退出</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </nav>
    </div>
    <div class="body" style="top:50px;padding:0px;bottom:25px;">
        <iframe src="{:url('ebcms/index/index?tpl=main')}" name="main" id="main" frameborder="0" style="width:100%;height:100%;display: block;"></iframe>
    </div>
    <div class="footer" style="height:25px;padding:0px;">
        <div style="height:23px;text-align:right;line-height:23px;margin:0px;">2014-2016 版权所有 侵权必究！&nbsp;&nbsp;</div>
    </div>
{include file='common/footer' /}